package com.itheima.tlais_web_management.aop;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Order(1) //控制切面顺序
@Aspect
@Component
public class MyAspecttwo {

    // 前置通知
    @Before("com.itheima.tlais_web_management.aop.MyAspect.pt()")
    public void beforeAdvice(JoinPoint joinPoint) {
        System.out.println("Before...two");
    }

    // 后置通知
    @After("com.itheima.tlais_web_management.aop.MyAspect.pt()")
    public void afterAdvice(JoinPoint joinPoint) {
        System.out.println("After...two");
    }

}
